package com.guoguo.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.guoguo.entity.Users;
import com.guoguo.entity.vo.BuyAlbumVO;
import com.guoguo.entity.vo.UserFavouriteVO;
import com.guoguo.entity.vo.UserInfoVO;
import com.guoguo.entity.vo.UsersVO;


/**
 * Created by Administrator on 2017/8/7 0007.
 */
public interface UsersMapper {
    Users findUserAccount(Users users);

    Users findAccount(Users users);

    Users selectByPrimaryKey(String userId);
    
    Users selectUserByPhone(@Param("phoneNo") String phoneNo);

    Users userRegister(Users users);

    Users updateUserpwd(Users users);

    Users findPhone(Users users);

    UsersVO findUsersInfo(String userId);

    UserInfoVO findUsersInfoVO(String userId);

   // void updateUsers(Users users);

    int updateUsers(Users users);

    int insertUsers(Users users);

    List<UserFavouriteVO> Userfavourite(String userId);

    List<BuyAlbumVO> UserBuyAlbum(String userId);


    /**
     * 查询所有用户
     * @return
     */
    List<UsersVO> selectUserList();

    /**
     * 根据Id去修改用户
     */
    int updateUsersById(String userId);

    /**
     * 根据用户名去查询判断用户是否存在
     */

    int count (String phone);

	/**
	 * @param 查询手机用户是否存在
	 * @return
	 */
	Integer selectCountByPhone(@Param("phoneNo")String phoneNo);

	/**
	 * 绑定用户手机号
	 * @param userId
	 * @param phone
	 * @return
	 */
	Integer updatePhone(@Param("userId") String userId, @Param("phone") String phone);
   
	/**
	 * 设置密码
	 * @param userId
	 * @param password
	 * @return
	 */
	boolean setPassword(@Param("userId")String userId, @Param("userpwd")String userpwd);
    
	/**
	 * 重置密码验证
	 * @param userId
	 * @param phone
	 * @param password
	 * @return
	 */
	Integer resetPassword(@Param("userId")String userId, @Param("phone") String phone);
}
